package com.xiaozhengkeji.mc.xzlib.module;

import com.xiaozhengkeji.mc.xzlib.tools.DaysTool;
import org.bukkit.entity.Player;

/**
 * 日记消息记录 工具模块
 */
public class MessageModule{
    private String plugName;
    private String plugPlayerTab;

    public MessageModule(String 插件名称, String 向玩家发送消息的前缀) {
        this.plugName = 插件名称;
        this.plugPlayerTab = 向玩家发送消息的前缀;
    }

    public void msg(String 消息) {
        String 待输出 = "[" + DaysTool.getDays() + "] " + "[ " + this.plugName + "]:> " + 消息;
        System.out.println(待输出);
    }

    public void msgP(Player p, String 消息) {
        p.sendMessage(plugPlayerTab + 消息);
    }
}
